package koala.kuangjiademo.util;

import android.content.Context;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.dhy.xintent.XCommon;

import java.util.List;

import koala.kuangjiademo.R;
import koala.kuangjiademo.data.InfoItem;

public class InfoItemAdapter extends IBaseAdapter<InfoItem> {
    public InfoItemAdapter(Context context, @Nullable List<InfoItem> list) {
        super(context, list, R.layout.info_item);
    }

    @Override
    public void updateItemView(InfoItem i, int position, View convertView, ViewGroup parent) {
        XCommon.setTextWithFormat((TextView) convertView, new Object[]{i.label, i.content});
    }
}
